home *** CD-ROM | disk | FTP | other *** search
/ Ultra Mac Games 1 & 2 / UltraMacGames1.iso / Children / BabyLabyrinth 1.05 f / Customizing < prev    next >
Text File  |  1993-11-24  |  8KB  |  166 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. This document describes step-by-step how creating a new animation to add to BabyLabyrinth.
  7. It is divided in five parts:
  8. • what you need.
  9. • creating the animation.
  10. • adding sounds.
  11. • writing the “BLB1” resource.
  12. • adding an about box
  13.  
  14. WHAT YOU NEED
  15.  
  16. you need: a Mac, a Babylabyrinth package copy, ResEdit and some digitised  sounds.
  17. BabyLabyrinth package contains:
  18. - BabyLabyrinth: the game.
  19. -BouncyBall, Nicky, Baby Henry, Fish, Trudy Bear, Speedy car : the additional animations.
  20. - ReadMe :the game introduction.
  21. - Customising : this document.
  22.  
  23.  
  24. CREATING THE ANIMATION
  25.  
  26. A BabyLabyrinth animation consists of three parts: the icons, the sounds 
  27. and a “BLB1” resource.
  28. The Icons are the “frames” of the animation.
  29. The sounds are used to make the animation ”play.
  30. The “BLB1” is used from the application to “keep together” icons and sounds.
  31. ****NOTICE****
  32. In previous versions of babyLabirinth a “BBLB” resource was used instead of actual “BLB1”. This was introduced in order to allow the “weeping” animation. Anyway old animations (the ones with “BBLB” resource) are still supported and will work fine with version1.0.4
  33. ***************
  34. for this explanation I will use Baby Henry animation as example, so, if you can, open it with resEdit and follow me.
  35. The BabyHenry ResEdit window should look like this:
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. • First the animation:
  46.  
  47. Let’s open ICON resource. This is its window:
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. The character of the animation can go in four directions: North, East, South and West. To animate each “direction” you can use from 1 up to 10 “frames”, but all directions must have the same number of frames . In this case Baby Henry’s frames are 4. 
  71. The order we must follow to store them in the resource file is N,E,S,W: once drawn the 16 frames they must be numbered sequentially respecting the given order: the 4 frames of North direction will have baseId, baseId+1 ,baseId+2 and baseId+3 identifiers (in this case 350,351,352,353) ; the frames for East direction  will have baseId+4, baseId+5, baseId+6, baseId+7 (354,355,356,357) identifiers and so on with South (358,359,360,361) and  West (362,363,364,365).
  72. The subject picture must be “centred” horizontally in the Icon, and have its “feet” on the icon base line (look at Baby Henry’s icons from 350 to 365).
  73. Obviously the last frame of each “sequence” (N,E,S,W) must precede the first one, so that when the program “switches” back to the first frame the  movement appears “smooth”.
  74.  
  75. Now the “extra” Icons: there must be at least 5 other icons in the resource file:
  76.  
  77. • 1 “target” icon: the icon that marks the end of the labyrinth (in this case the cradle: id 372) 
  78. • 1 or more  “target reached” icons: what will happen when the subject will reach the target ? If you want to animate it , simply create a small animation with some icons and save them with successive ids. (id 379, 380, 381, 382) If you prefer not to spend to much time with it simply draw one icon.
  79. • 1 or more “Crying” icons: what does the character do when is fed up with bouncing on the walls ? If you want to animate the “weeping”, simply create a small animation with some icons and save them with successive ids. (id 375,376,377,378) If you prefer not to spend to much time with it simply draw one icon.
  80. • 1 to 10 “object” icons: the character will find and take up some objects during his walk (ids 370,371). the “object” icons must be numbered sequentially.
  81. • 1 “menu” icon (wit a id between 305 and 511): the icon appearing on the “character” menu (id 302)
  82. It is necessary to be careful choosing the id for the menu icon: it must be between 305and 511 and it must be “unique” : no other “menu” icon of no other  animation can have the same id. If this happen there will be a bit of confusion and the “characters” menu will contain the wrong icons, even if the program will anyway work.
  83. The basic animation, and the extra ones have their ids between 299 and 304 (included).
  84.  
  85.  
  86. ADDING SOUNDS
  87.  
  88. you need at least 6 sounds:
  89.  
  90. • 1 to 10 “thung” sounds numbered sequentially: the sounds the character make when hits a wall.
  91. • 1 to 10 “object found” sounds numbered sequentially: the sounds the character makes when finds an object.
  92. • 1 “Whaaa” sound: the sound the character make when is fed up with hitting the walls.
  93. • 1 “startgame” sound: the sound played on labyrinth start-up.
  94. • 1 “targetReached” sound: played once the target is reached.
  95. Here is the babyHenry snds resEdit window:
  96.  
  97.   
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. once created the icons and added sounds comes the time to write the BLB1 resource:
  110.  
  111.  
  112. WRITING THE “BLB1” RESOURCE.
  113.  
  114. “BLB1” resource is used from the program to “find out” the frames and the sounds.
  115. in it there are 16 fields:
  116.  
  117. • “Base animation ID” : the id of first frame of the animation (the first of North sequence).
  118. • “Number of Frames (10 max)” : the number of frames for each direction (NOT THE TOTAL NUMBER).
  119. • “Speed”: the number of pixel by which the character will be advanced for each step at normal speed (must be a number between 1 and 12 but it should be less then the minimal width or height of the animation's images)
  120. • “Target Icon Id”: the ids the target image (see before)
  121. • “number of target reached anim frames” : the number of frames for “target reached” animation.
  122. • “first Target Reached Icon ID” : the Id  of first frame of the animation.
  123. • ”Number of "Crying" frames”: the number of frames for “Crying” animation.
  124. • ”First "Crying" Icon ID”: the Id  of first frame of the animation.
  125. • First candy Id : the id of first object icon (see before)
  126. • number  of candies: the total number of objects
  127. • Menu Icon Id : see before.
  128. • “Crunch” sounds num: the number of sounds that can be played when a wall is hit.
  129. • first “crunch” sound id.
  130. • “Eat candy” sounds num: the number of sounds that can be played when an object is found.
  131. • first “Eat candy” sound id.
  132. • “target reached” sound id.
  133. • “start game” sound id.
  134. • “CrybabyCry” sound id.
  135. • “BackGround Pattern Id”: actually unused
  136.  
  137. ADDING AN ABOUT BOX
  138.  
  139. From version 1.0.2 you can optionally add an alert relative to your animation. Simply create an alert and write or paste in it anything you like. Then set its name to the name of the animation (the BLB1 resource one). The program itself will check the existence of such a dialog and add an "About charachtername…" item under "about Babylabyrinth" one under the apple menu.
  140.  
  141.  
  142. That’s all.
  143.  
  144. You can store more animations in the same file, and they can share the same sounds and icons
  145.  
  146. If you want to create your animation proceed as follow:
  147. - first create a new file with ResEdit.
  148. - draw the icons for your animation, add them to the file and number them as explained.
  149. - choose the sounds for your animation, or digitise them, add them to the file and number them as explained.
  150. - copy from babyLabyrinth or from another animation the “BLB1” template (“TMPL” resource) and paste it in the file.
  151. - create a new resource of “BLB1” type, open it and write in it the informations about icons and sounds ids.
  152. - rename the resource to the name you choose for your animation.
  153. - change the type of the file to “BlAn” (respect the case !)
  154. - change the file creator to “BLB1”.
  155.  
  156. now save the file, close it, put it in the same directory of BabyLabyrinth and launch the game.
  157. If you did everything right your character should appear in the “characters” menu and you can choose and try it. If something goes wrong, the application should advise you. In such case check your animation.
  158. That’s all.
  159.  
  160.  
  161. If somebody creates nice animations I would be happy to have them.
  162.  
  163. Enjoy !
  164.  
  165.  
  166. Simone